<?php

if(isset($_POST['url'])){

	$url=$_POST['url'];
			if(preg_match("/hamtruyen.com/i",$_POST['url'])){
					
					//echo str_replace('?imgmax=3000','',$data);
					$data = geturl($_POST['url']);
				 	$html=str_get_html($data);
					
					foreach($html->find("img") as $val){
						$val=$val->src;
						if(strpos($val,"blogspot.com")!==false||strpos($val,"imgur")!==false||strpos($val,"bbmedia.hamtruyen.com")!==false){
						$str.="<img src='".$val."'/>";
						}
					}
					
					
					$data= str_replace('?imgmax=2048','',$str);
					
				
					
						if(mb_strpos($data,'bbmedia.hamtruyen.com') !==false){
							$surl="content=".urlencode($data);
							$url = 'http://bk2.manga24h.com/index.php';
							$resultContent = mycurl($surl,$url);
							$data = urldecode($resultContent);
							echo $data;
						}else{
							echo $data;
						}
				
					exit();
	
	

	}
	
	
	if(preg_match("/truyen18.org/i",$_POST['url'])){
	
		$data=truyen18($_POST['url']);
		//$data='abccccccccccccc';
		echo $data;
		//$str= $html->find('.entry',0)->find('p',0)->innertext;
	//	echo str_replace('?imgmax=3000','',$str);
		exit();

	}
	

	if(preg_match("/blogtruyen.com/i",$_POST['url'])){
				$data=geturl($_POST['url']);
				 
					$html=str_get_html($data);
			$str= $html->find('#content',0)->innertext;
			echo str_replace('?imgmax=2048','',$str);
		
		exit();

	

	}
		if(preg_match("/a3manga/i",$_POST['url'])){
				$data=a3manga($_POST['url']);
				// echo $data;
				
					$html=str_get_html($data);
			$str= $html->find('.view-chapter',0)->innertext;
			echo $str;
		//	echo str_replace('?imgmax=2048','',$str);
		
		exit();

	

	}
	
	
	if(preg_match("/vuatruyentranh/i",$_POST['url'])){
			$html=file_get_html($url);
			$str= $html->find('#pics',0)->innertext;
			echo $str;
		
		exit();

	

	}
	
	
	if(preg_match("/vuitruyentranh/i",$_POST['url'])){
		
					$surl="url=".urlencode($_POST['url']);
					$url = 'http://anime24h.vn/picasa/index3.php';
					$resultContent = mycurl($surl,$url);
					$data = urldecode($resultContent);
					
					
					$html=str_get_html($data);
		
			
			$str= $html->find('#contentWapper',0)->innertext;
			$str=str_replace('src="http://vuimanga.static.game.zing.vn/resources/vmg/img/1x1px.gif?v=52"',' ',$str);
			$data=str_replace('data-original','src',$str); 
			$surl="content=".urlencode($data);
			$url = 'http://bk2.manga24h.com/index.php';
			$resultContent = mycurl($surl,$url);
			$data = urldecode($resultContent);
			echo $data;
			
		
		exit();

	

	}
	
		if(preg_match("/http:\/\/truyentranhnhanh.com/i",$_POST['url'])){
		
					$surl="url=".urlencode($_POST['url']);
					$url = 'http://anime24h.vn/picasa/index3.php';
					$resultContent = mycurl($surl,$url);
					$data = urldecode($resultContent);
					
					
					$html=str_get_html($data);
					$data= $html->find('.neoslideshow',0)->innertext;
			
					$surl="content=".urlencode($data);
					$url = 'http://bk2.manga24h.com/index.php';
					$resultContent = mycurl($surl,$url);
					$data = urldecode($resultContent);
					echo $data;
			
			
			//$str= $html->find('.neoslideshow',0)->find('img');
			//foreach($str as $val){
			//echo $val->src."<Br/>";
			//}
			
		
			exit();

	

		}
		if(preg_match("/m.truyentranhnhanh.com/i",$_POST['url'])){
					
					$surl="url=".urlencode($_POST['url']);
					$url = 'http://anime24h.vn/picasa/index3.php';
					$resultContent = mycurl($surl,$url);
					$data = urldecode($resultContent);
					
					
					$html=str_get_html($data);
					$data= $html->find('.noidung',0)->innertext;
			
					$surl="content=".urlencode($data);
					$url = 'http://bk2.manga24h.com/index.php';
					$resultContent = mycurl($surl,$url);
					$data = urldecode($resultContent);
					echo $data;
			
			
			//$str= $html->find('.neoslideshow',0)->find('img');
			//foreach($str as $val){
			//echo $val->src."<Br/>";
			//}
			
		
			exit();

	

		}
	
	

		if(preg_match("/vechai/i",$_POST['url'])){
			
					
					$data= geturl($_POST['url']);
					
				 
					$html=str_get_html($data);
					foreach($html->find('img') as $val){
						if(strpos($val->src,'blogspot.com')!==false ||strpos($val->src,'vechai.info')!==false ){
						$str.='<img src="'.$val->src.'" />';
						}
					}
				
					
					$data= str_replace('?imgmax=2000','',$str);
					
					
						if(mb_strpos($data,'vechai.info') !==false){
							$surl="content=".urlencode($data);
							$url = 'http://bk2.manga24h.com/index.php';
							$resultContent = mycurl($surl,$url);
							$data = urldecode($resultContent);
							echo $data;
						}else{
							echo $data;
						}
					
					exit();
				
				//End of phantom
	}
	
		if(preg_match("/comicvn/i",$_POST['url'])){
					$surl="url=".urlencode($_POST['url']);
					$url = 'http://anime24h.vn/picasa/index3.php';
					$resultContent = mycurl($surl,$url);
					$data = urldecode($resultContent);
				 
					$html=str_get_html($data);
					
					$data=$html->find('#txtarea',0)->innertext;
					echo $data;
					exit();
				
				//End of phantom
	}
	
	

	if(preg_match("/vnsharing.net/i",$_POST['url'])){
	
		$str=geturln($_POST['url']);
		
		$data=vnsurl($str);
		
		if(mb_strpos($data,'vnsharing') !==false){
			//echo "CÓ LINK CỦA VNSHARING, XIN VUI LÒNG CHỌN NGUỒN KHÁC ĐỂ LẤY LINK NHÉ";
		
					$surl="content=".urlencode($data);
					$url = 'http://bk2.manga24h.com/index.php?dt='.date('U');
					$resultContent = mycurl($surl,$url);
					$data = urldecode($resultContent);
					echo $data;
			//echo $data;
		}else{
		
		echo $data;
		}
		exit();

	}
	
			if(preg_match("/truyentranhtuan.com/i",$_POST['url'])){
					$data=ttt($_POST['url']);
					
					//Check link co ttt thi ko duoc
					$pos=strpos($data,'truyentranhtuan');
					if($pos!==false){
				
					$surl="content=".urlencode($data);
					$url = 'http://bk2.manga24h.com/index.php';
					$resultContent = mycurl($surl,$url);
					$data = urldecode($resultContent);
					echo $data;
				//	echo $data;
					}else{
						echo $data;
					}
					//
					exit();
				
				//End of phantom
			}
			
		
			if(preg_match("/izmanga/i",$_POST['url'])){
					$data=iz($_POST['url']);
					echo str_replace('?imgmax=3000','',$data);
				
					exit();
				
				//End of phantom
			}
			
			if(preg_match("/123doc/i",$_POST['url'])){
					$data=doc123($_POST['url']);
					
					$tag="span";
				 $data=preg_replace('/<'.$tag.'[^>]*>/i', '', $data);
				   $data=preg_replace('/<\/'.$tag.'>/i', '', $data);
					echo $data;
				
					exit();
				
				//End of phantom
			}
			
			if(preg_match("/nhacvn/i",$_POST['url'])){
					$data=nhacvn($url);
					
				//	$data=$html->find('.chapter_slider',0)->innertext;
					echo str_replace('?imgmax=1300','',$data);
				
					exit();
				
				//End of phantom
			}
		
			
			if(preg_match("/truyentranh8/i",$_POST['url'])){
					$data=truyentranh8($url);
					
				//	$data=$html->find('.chapter_slider',0)->innertext;
				$data= str_replace('<img src="http://truyentranh8.com/templates/main/images/gioithieubanbe3.png" class="lazy">','',$data);
				$data= str_replace('?imgmax=1600','',$data);
			
				echo $data;
					exit();
				
				//End of phantom
			}
			
	if(preg_match("/truyenhay24h/i",$_POST['url'])){
					$data=truyenhay($_POST['url']);
					
					echo str_replace('?imgmax=2048','',$data);
					exit();
				
				//End of phantom
	}

}


exit();
?>







